import { createBrowserRouter } from 'react-router-dom'
import Home from '../parges/Home'
import H404 from '../parges/404'
import List from '../parges/List'
import Index from '../parges/Index'
import ListQj from '../parges/ListQj'

export const routerlist = [
    {
        path: "/home",
        element: <Index></Index>,
        title: "home"
    },
    {
        path: '/list',
        element: <List></List>,
        title: "list",
        children: [
            {
                path: '/list/ListQj',
                element: <ListQj></ListQj>,
                title: "请假申请"
            }
        ]
    }
]

const router = createBrowserRouter([
    {
        path: '/',
        element: <Home></Home>,
        children: routerlist
    },
    {
        path: '/*',
        element: <H404></H404>
    }
])

export default router